//
//  ErWeiMaWebViewController.m
//  LifeShopping
//
//  Created by panxue on 16/3/2.
//  Copyright © 2016年 panxue. All rights reserved.
//

#import "ErWeiMaWebViewController.h"

@interface ErWeiMaWebViewController ()<UIWebViewDelegate>
@property (nonatomic, retain)UIWebView *web;

@end

@implementation ErWeiMaWebViewController
- (void)dealloc
{
    [_web release];
    [super dealloc];
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //返回按钮
    self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"jiantou"] style:UIBarButtonItemStyleDone target:self action:@selector(back)] autorelease];
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

    //UIWebView 加载网页数据
    self.web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 49)];
    _web.delegate = self;
    _web.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:_web];
    
    //加载网址
    [_web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
    [_web release];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)back
{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
